<html>
<head><meta charset="utf-8"><title>description of the data format · t-compiler/wg-self-profile · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/index.html">t-compiler/wg-self-profile</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html">description of the data format</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="165105150"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165105150" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165105150">(May 07 2019 at 19:56)</a>:</h4>
<p><span class="user-mention" data-user-id="125250">@Wesley Wiser</span> is there any where (either code or docs) to describe the format of the events? I'm curious whether I could "port" my perf-focus tool to this setup</p>



<a name="165105678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165105678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165105678">(May 07 2019 at 20:03)</a>:</h4>
<p>Are you looking for the raw on-disk format or the internal api used by the tools?</p>



<a name="165105754"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165105754" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165105754">(May 07 2019 at 20:04)</a>:</h4>
<p>What I'd recommend is is using using <code>measureme</code> as a dependency which is how the tools we have currently work</p>



<a name="165105825"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165105825" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165105825">(May 07 2019 at 20:05)</a>:</h4>
<p>The main thing you want is <code>measureme::ProfilingData::iter()</code></p>



<a name="165105851"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165105851" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165105851">(May 07 2019 at 20:06)</a>:</h4>
<p>There's a very basic example of using it here: <a href="https://github.com/rust-lang/measureme/blob/master/mmview/src/main.rs" target="_blank" title="https://github.com/rust-lang/measureme/blob/master/mmview/src/main.rs">https://github.com/rust-lang/measureme/blob/master/mmview/src/main.rs</a></p>



<a name="165106117"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106117" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106117">(May 07 2019 at 20:08)</a>:</h4>
<p>What kind of input does your perf-focus tool need?</p>



<a name="165106148"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106148" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106148">(May 07 2019 at 20:09)</a>:</h4>
<p>well the existing tool expects a stream of samples</p>



<a name="165106152"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106152" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106152">(May 07 2019 at 20:09)</a>:</h4>
<p>but I would probably just rewrite it</p>



<a name="165106163"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106163" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106163">(May 07 2019 at 20:09)</a>:</h4>
<p>There's also this tool <a href="https://github.com/rust-lang/measureme/tree/master/stack_collapse" target="_blank" title="https://github.com/rust-lang/measureme/tree/master/stack_collapse">https://github.com/rust-lang/measureme/tree/master/stack_collapse</a></p>



<a name="165106169"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106169" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106169">(May 07 2019 at 20:09)</a>:</h4>
<p>i'll take a look at measureme</p>



<a name="165106178"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106178" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106178">(May 07 2019 at 20:09)</a>:</h4>
<p>Which outputs a file of "stack" samples</p>



<a name="165106241"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106241" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106241">(May 07 2019 at 20:10)</a>:</h4>
<p>That might be a good starting point for your tool</p>



<a name="165106247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106247">(May 07 2019 at 20:10)</a>:</h4>
<p>Or perhaps you could reuse the output as is</p>



<a name="165106293"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106293" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106293">(May 07 2019 at 20:11)</a>:</h4>
<p>ah, perhaps</p>



<a name="165106305"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106305" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106305">(May 07 2019 at 20:11)</a>:</h4>
<p>still, I wouldn't mind rewriting it</p>



<a name="165106431"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106431" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106431">(May 07 2019 at 20:12)</a>:</h4>
<p>You're probably going to end up writing something similar to this function <a href="https://github.com/rust-lang/measureme/blob/e0d7945a5280b363a09a068c26c6c5bf21247ad2/stack_collapse/src/stack_collapse.rs#L6" target="_blank" title="https://github.com/rust-lang/measureme/blob/e0d7945a5280b363a09a068c26c6c5bf21247ad2/stack_collapse/src/stack_collapse.rs#L6">https://github.com/rust-lang/measureme/blob/e0d7945a5280b363a09a068c26c6c5bf21247ad2/stack_collapse/src/stack_collapse.rs#L6</a></p>



<a name="165106447"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106447" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106447">(May 07 2019 at 20:12)</a>:</h4>
<p>So it's a starting point</p>



<a name="165106603"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106603" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106603">(May 07 2019 at 20:14)</a>:</h4>
<p>this is really cool y'all :)</p>



<a name="165106637"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106637" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106637">(May 07 2019 at 20:14)</a>:</h4>
<p>Let us know if you need anything</p>



<a name="165106805"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106805" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106805">(May 07 2019 at 20:16)</a>:</h4>
<p>One more question <span class="user-mention" data-user-id="125250">@Wesley Wiser</span> -- is it easy to integrate this into the <a href="http://perf.rust-lang.org" target="_blank" title="http://perf.rust-lang.org">perf.rust-lang.org</a> benchmarks? i.e., those have some kind of options for different profiling modes, have we added self-profiler yet?</p>



<a name="165106829"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106829" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106829">(May 07 2019 at 20:17)</a>:</h4>
<p>That's the next thing we're working on</p>



<a name="165106840"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106840" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106840">(May 07 2019 at 20:17)</a>:</h4>
<p>We have a meeting tomorrow morning to talk about that and our next steps</p>



<a name="165106866"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106866" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106866">(May 07 2019 at 20:17)</a>:</h4>
<p>Ah, ok, great.</p>



<a name="165106884"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165106884" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165106884">(May 07 2019 at 20:17)</a>:</h4>
<p>The main question is can we always turn this on for perf.rlo or do we need a special mode</p>



<a name="165107004"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165107004" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165107004">(May 07 2019 at 20:18)</a>:</h4>
<p>yeah</p>



<a name="165107016"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165107016" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165107016">(May 07 2019 at 20:19)</a>:</h4>
<p>see my other topic :)</p>



<a name="165107057"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165107057" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> nikomatsakis <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165107057">(May 07 2019 at 20:19)</a>:</h4>
<p>so in theory I can drag-n-drop these files onto the google chrome profiler or something?</p>



<a name="165107197"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165107197" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165107197">(May 07 2019 at 20:20)</a>:</h4>
<p><a href="https://github.com/rust-lang/measureme/tree/master/crox#crox" target="_blank" title="https://github.com/rust-lang/measureme/tree/master/crox#crox">https://github.com/rust-lang/measureme/tree/master/crox#crox</a></p>



<a name="165107413"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/187831-t-compiler/wg-self-profile/topic/description%20of%20the%20data%20format/near/165107413" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Wesley Wiser <a href="https://rust-lang.github.io/zulip_archive/stream/187831-t-compiler/wg-self-profile/topic/description.20of.20the.20data.20format.html#165107413">(May 07 2019 at 20:23)</a>:</h4>
<p>This website also claims to support the chrome format if you don't want to launch chrome <span aria-label="slight smile" class="emoji emoji-1f642" role="img" title="slight smile">:slight_smile:</span> <a href="https://www.speedscope.app/" target="_blank" title="https://www.speedscope.app/">https://www.speedscope.app/</a></p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>